function leave_post(obj){
    var id      = $(obj).attr("id");        //代理人ID
    var status  = $(obj).attr("status");    //代理人状态 1：正常 -1：离岗
    layer.confirm('确认要修改吗？', {
        btn : [ '确定', '取消' ]//按钮
    }, function(index) {
        layer.close(index);
        $.ajax({
            type: "POST",
            url:'index.php?r=agent-user/update-status',
            data:{id:id,status:status},
            dataType: 'json',
            success: function(result){
                layer.msg(result.message,{time:1000});
                //修改成功修改
                if(result.code == 0){
                    $(obj).text(result.sname);
                    $(obj).attr("status",result.status);
                }
            }
        });
    })
}